package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.MarketingMapper;
import com.whq.entity.Marketing;
import com.whq.service.MarketingService;

@Service(value = "tdMarketingService")
public class MarketingServiceImpl implements MarketingService {

    @Autowired
    private MarketingMapper<Marketing>tdMarketingMapper;
    
    @Override
    public Integer insertSelective(Marketing tdMarketing) throws Exception {
           return this.tdMarketingMapper.insertSelective(tdMarketing);
        }

    @Override
    public Integer insertBatch(List<Marketing> tdMarketing) throws Exception {
           return this.tdMarketingMapper.insertBatch(tdMarketing) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdMarketingMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdMarketingMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(Marketing tdMarketing) {
           return this.tdMarketingMapper.updateByPrimaryKeySelective(tdMarketing);
    }

    @Override
    public Marketing findById(Object id) {
           return (Marketing) this.tdMarketingMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Marketing> selectByCondition(Marketing tdMarketing) {
           return (List<Marketing>) this.tdMarketingMapper.selectByCondition(tdMarketing);
    }

    @Override
    public Integer selectCountByCondition(Marketing tdMarketing) {
           return  this.tdMarketingMapper.selectCountByCondition(tdMarketing);
    }

}
